<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    
    *{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    .box{
        width: 500px;
        height: 500px;
        /* background-color: skyblue; */
        margin: 60px auto;
        position: relative;
        transform: rotate3d(1,1,1,30deg);
        transform-style: preserve-3d;
        animation: donga 5s linear infinite;
    }
    .box>div{
        width: 300px;
        height: 300px;
        margin: 50px auto;
        text-align: center;
        line-height: 300px;
        font-size: 30px;
        color: white;
        position: absolute;
        top: 0;
        left: 0;
    }
    .left{
        background-color: skyblue;
        transform: translateX(-150px) rotateY(90deg);
    }
    .right{
        background-color: rebeccapurple;
        transform: translateX(150px) rotateY(90deg);
    }
    .front{
        background-color: forestgreen;
        transform: translateZ(150px);
    }
    .back{
        background-color: burlywood;
        transform: translateZ(-150px);
    }
    .up{
        background-color:crimson;
        transform: translateY(-150px) rotateX(90deg);
    }
    .down{
        background-color: darkslateblue;
        transform: translateY(150px) rotateX(90deg);
    }
    @keyframes donga {
        from{

        }
        to{
            transform: rotateX(360deg) rotateY(360deg);
        }
    }
    </style>
</head>
<body>
    <div class="box">
        <div class="left">左</div>
        <div class="right">右</div>
        <div class="front">前</div>
        <div class="back">后</div>
        <div class="up">上</div>
        <div class="down">下</div>
    </div>
</body>
</html>